/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlEditUnit.java
 *
 * Created on 27 ม.ค. 2553, 11:51:47
 */

package Inventory;

/**
 *
 * @author Administrator
 */
public class PnlEditUnit extends javax.swing.JPanel {

    /** Creates new form PnlEditUnit */
    public PnlEditUnit() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadEditUnit = new javax.swing.JPanel();
        lblHeadEditUnit = new javax.swing.JLabel();
        btnUnitEditSave = new javax.swing.JButton();
        btnUnitEditCancel = new javax.swing.JButton();
        btnUnitEditDel = new javax.swing.JButton();
        btnUnitPrint = new javax.swing.JButton();
        pnlEditUnit = new javax.swing.JPanel();
        lblUnCode = new javax.swing.JLabel();
        txtUnCode = new javax.swing.JTextField();
        txtUnName = new javax.swing.JTextField();
        lblUnName = new javax.swing.JLabel();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadEditUnit.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadEditUnit.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditUnit.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditUnit.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadEditUnit.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
        lblHeadEditUnit.setText("หน่วยนับสินค้า");

        btnUnitEditSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N

        btnUnitEditCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N

        btnUnitEditDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnUnitPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnUnitPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnUnitPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnUnitPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadEditUnitLayout = new javax.swing.GroupLayout(pnlHeadEditUnit);
        pnlHeadEditUnit.setLayout(pnlHeadEditUnitLayout);
        pnlHeadEditUnitLayout.setHorizontalGroup(
            pnlHeadEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadEditUnitLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlHeadEditUnitLayout.createSequentialGroup()
                        .addComponent(btnUnitEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnUnitEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnUnitEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnUnitPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblHeadEditUnit))
                .addGap(490, 490, 490))
        );
        pnlHeadEditUnitLayout.setVerticalGroup(
            pnlHeadEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadEditUnitLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(pnlHeadEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnUnitPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnlHeadEditUnitLayout.createSequentialGroup()
                        .addComponent(lblHeadEditUnit)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlHeadEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnUnitEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnUnitEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnUnitEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlHeadEditUnit, java.awt.BorderLayout.PAGE_START);

        pnlEditUnit.setMaximumSize(new java.awt.Dimension(700, 32767));
        pnlEditUnit.setMinimumSize(new java.awt.Dimension(700, 100));

        lblUnCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblUnCode.setText("รหัสหน่วยนับสินค้า :");

        txtUnCode.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtUnCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtUnCodeActionPerformed(evt);
            }
        });

        txtUnName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtUnName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtUnNameActionPerformed(evt);
            }
        });

        lblUnName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblUnName.setText("หน่วยนับสินค้า :");

        javax.swing.GroupLayout pnlEditUnitLayout = new javax.swing.GroupLayout(pnlEditUnit);
        pnlEditUnit.setLayout(pnlEditUnitLayout);
        pnlEditUnitLayout.setHorizontalGroup(
            pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditUnitLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlEditUnitLayout.createSequentialGroup()
                        .addComponent(lblUnCode)
                        .addGap(20, 20, 20))
                    .addGroup(pnlEditUnitLayout.createSequentialGroup()
                        .addComponent(lblUnName)
                        .addGap(18, 18, 18)))
                .addGroup(pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtUnName)
                    .addComponent(txtUnCode, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(399, 399, 399))
        );
        pnlEditUnitLayout.setVerticalGroup(
            pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditUnitLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtUnCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblUnCode))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEditUnitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtUnName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblUnName))
                .addContainerGap(352, Short.MAX_VALUE))
        );

        add(pnlEditUnit, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void txtUnCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUnCodeActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtUnCodeActionPerformed

    private void txtUnNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUnNameActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtUnNameActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnUnitEditCancel;
    private javax.swing.JButton btnUnitEditDel;
    private javax.swing.JButton btnUnitEditSave;
    private javax.swing.JButton btnUnitPrint;
    private javax.swing.JLabel lblHeadEditUnit;
    private javax.swing.JLabel lblUnCode;
    private javax.swing.JLabel lblUnName;
    private javax.swing.JPanel pnlEditUnit;
    private javax.swing.JPanel pnlHeadEditUnit;
    private javax.swing.JTextField txtUnCode;
    private javax.swing.JTextField txtUnName;
    // End of variables declaration//GEN-END:variables

}
